import Vue from 'vue'
import VueRouter from 'vue-router'

const Home = () => import('views/home/Home.vue')
const Produce = () => import('views/produce/Produce.vue')
const Products = () => import('views/products/Products.vue')
const Service = () => import('views/service/Service.vue')
const News = () => import('views/news/News.vue')
const contact = () => import('views/contact/Contact.vue')

Vue.use(VueRouter)

const routes = [
  {
    path: '',
    redirect: '/home'
  },
  {
    path: '/home',
    component: Home
  },
  {
    path: '/produce',
    component: Produce
  },
  {
    path: '/products',
    component: Products
  },
  {
    path: '/service',
    component: Service
  },
  {
    path: '/news',
    component: News
  },
  {
    path: '/contact',
    component: contact
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
